﻿using UnityEngine;
using System.Collections;

namespace Lost{
	/// <summary>
	/// 需要展示的物体的旋转
	/// </summary>
	public class RotateShowing : MonoBehaviour {
		///旋转轴是本地坐标？
		[SerializeField] bool IsLocal = true;
		[SerializeField] Vector3 Axis = new Vector3(0f,1f,0f);
		[SerializeField] float rotateSpeed = 45f;
		void Start () {
		}

		void Update () {
			if (IsLocal) {
				transform.Rotate (Axis, rotateSpeed * Time.deltaTime);
			} else {
				transform.RotateAround (transform.position, Axis, rotateSpeed * Time.deltaTime);
			}
		}
	}
}
